#! /bin/bash
# QUERY_STRING "id=(002,003,004)" --> PATTERN "patient:p(002|003|004)"
export PATTERN=`echo "$QUERY_STRING" | sed 's/,/|/g' | sed 's/id=/patient:p/'`
echo "# Cardiology patient data for PATTERN: $PATTERN"
egrep "@prefix|($PATTERN)" $1
exit 0

